#include<iostream>
using namespace std;
const int N = 32010;
typedef long long LL;
LL tree[N];
int lever[N];
int n;
int lowbit(int x)
{
	return x & -x;
}
void add(int x)
{
	for (int i = x; i < N; i += lowbit(i)) {
		tree[i] ++;
	}
}
LL sum(int x)
{
	LL ans = 0;
	for (int i = x; i; i -= lowbit(i)) {
		ans += tree[i];
	}
	return ans;
}
int main()
{
	cin >> n;
	for (int i = 0; i < n; i++) {
		int x, y;
		cin >> x >> y;
		x++;
		y++;
		lever[sum(x)]++;
		add(x);
	}
	for (int i = 0; i < n; i++) {
		cout << lever[i] << endl;
	}
	return 0;
}